package day240509.p2;


import day240509.p2.JieXi;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;

import java.io.IOException;

public class XiaoYu extends JieXi {
    @Override
    public Elements getInfo(int page) throws IOException {
        //按最新帖子排序
        Document doc= Jsoup.connect("http://bbs.xmfish.com/thread-htm-fid-55-search-all-orderway-postdate-asc-DESC-page-" + page + ".html").get();
        //找到这一页所有闲置
        Elements es=doc.select("tbody[id=threadlist]").select("tr[class=tr3]");
        System.out.println(es.size());
        return es;
    }

    @Override
    public String setLink() {
        //返回网站首页
        return "https://bbs2.xmfish.com/";
    }
}

